package iconcurrent;

/**
 * 最佳单例实践
 * @author or2
 * @date 2021/8/7 10:43
 */
public enum EnumSingleton {
    /**
     * 单例实例
     */
    INSTANCE;

    private final IThreadFactory threadFactory = new IThreadFactory(EnumSingleton.class);

    /**
     * 获取唯一单例
     * @return 单例实现
     */
    public IThreadFactory getThreadFactoryInstance() {
        return INSTANCE.threadFactory;
    }
}
